In computer networking, a protocol stack comprises a prescribed hierarchy of software layers, starting from the application layer at the top (the source of the data being sent) to the physical layer at the bottom (transmitting the bits on the wire). Elements of the protocol stack include an application layer, a transport layer, a network layer, a data-link layer and a physical layer.
The application layer comprises a software application closest to a user, supports network access, and provides services for user applications.
The transport layer is responsible for conveying data across a network from a source to a destination. Examples of transport layers include Transmission Control Protocol (TCP), User Datagram Protocol (UDP) and Stream Control Transmission Protocol (SCTP).
The network layer enables transferring data from a source to a destination host via one or more networks. The network layer identifies the addresses of neighboring nodes in the network, packages data with network address information, selects routes and quality of service, recognizes incoming messages for local host domains, and forwards the incoming messages to the transport layer. Internet Protocol (IP) is an example of a network layer.
The data-link layer is the protocol layer which handles the moving of data across a physical link (i.e., layer) in a network. The data-link layer divides output data into data frames, and handles the acknowledgements from a receiver that the data arrived successfully. The data-link layer also ensures that incoming data has been received successfully by analyzing bit patterns at special places in the frames. Examples of data link layers include Ethernet, and Fiber Distributed Data Interface (FDDI).
Finally, the physical layer consists of the basic hardware transmission technologies of a network. The physical layer defines how raw bits (rather than logical data packets) are transmitted over a physical link (i.e., connecting network nodes). Physical layer devices just take messages (i.e., input bits) and convey them as output, and typically have no knowledge of the contents of the messages. Examples of physical layer devices include repeaters, hubs, transceivers and network media.